pull: Support deltas for explicit commits
authorColin Walters <walters@verbum.org>
Tue, 11 Apr 2017 21:22:54 +0000 (17:22 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 12 Apr 2017 21:30:33 +0000 (21:30 +0000)
commitb9df96db8bd5bc40f90a9006c9aa8cbcf01fbc41
treebe87900c025a5129670f2f56d3199548a9e96fe8
parent8742287b117cb8a04d4106d37bfe0e15f9666ef7
pull: Support deltas for explicit commits

I think the majority of OSTree usage calls pull with refs, not
explicit commits.  We even added special "override syntax" with
`@` (e.g. `ostree pull foo@ab12c34`) as a hybrid.

However, some users may want to still pull explicit commits
for whatever reason.  The old static delta logic looked at
the previous commit of the ref.  However, in https://github.com/ostreedev/ostree/pull/710
we enhanced the logic to look at all local commits.

It's now a lot more natural to teach the delta logic
to support revisions, e.g. `ostree pull someorigin ab12c34`.

This also fixes the problem that before, `--require-static-deltas`
was completely ignored when processing revisions.

This is a nontrivial refactoring of the logic, but the end
result feels a lot more readable to me.

Closes: https://github.com/ostreedev/ostree/issues/783
Closes: #787
Approved by: cgwalters
src/libostree/ostree-repo-pull.c
tests/pull-test.sh
tests/test-delta.sh